package org.jeecg.modules.car.mapper;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.entity.car.CarParkingRecord;

/**
 * @Description: 车场进出记录
 * @Author: jeecg-boot
 * @Date:   2020-09-27
 * @Version: V1.0
 */
public interface CarParkingRecordMapper extends BaseMapper<CarParkingRecord> {

    @SqlParser(filter = true)
    Integer addOrUpate(@Param("bean") CarParkingRecord carParkingRecord);

    @SqlParser(filter = true)
    CarParkingRecord getParkingRecordByCarNo(@Param("carNo") String carNo);

    List<CarParkingRecord> findPage(Page<CarParkingRecord> page,@Param("bean") CarParkingRecord carParkingRecord);

    CarParkingRecord getByRecordId(@Param("recordId") String recordId,@Param("isExit") Integer isExit);

    @SqlParser(filter = true)
    List<CarParkingRecord> getByCarNosAndParkId(@Param("tenantId") String tenantId, @Param("carNos") List<String> carNos, @Param("parkId") String parkId);

    @SqlParser(filter = true)
    List<CarParkingRecord> selectNotSyncShParking(@Param("parkId") String parkId,@Param("resendDate") String resendDate);

    @SqlParser(filter = true)
    Integer getIsExitByPlate(String carNo);
}
